Loading TOC...

POST /manage/v2/databases/{id|name}/temporal/collections?collection={name}

Summary

This resource address advances the LSQT for the specified temporal collection.

URL Parameters
collection The URI of the collection.
Request Headers
Content-type The MIME type of the data in the request body. Must be one of the following values: application/xml, application/json.

Response

Upon success, MarkLogic Server returns status code 200 (OK). The response body will be empty. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges. A status code of 400 (Bad Request) is returned if LSQT advancement is not enabled for this collection. A status code of 404 (Not Found) is returned if the temporal collection does not exist.

Required Privileges

This operation requires one of the following:

Usage Notes

When using XML, the data in the request body should have the following form:


<temporal-collection-operation xmlns="http://marklogic.com/manage">
  <operation>advance-lsqt</operation>
  <lag>number</lag>
</temporal-collection-operation>

When using JSON, the data in the request body should have the following form:


{ "operation" : "advance-lsqt", lag: number }

The operation XML element or JSON property is required and can only have the value shown. The lag XML element or JSON property is optional. Its value is the number of seconds to lag behind max system start time.

Example


# Advance LSQT on the "myTempColl" collection in "mydb", using a JSON payload
curl --anyauth --user user:password -i -X POST \
  -H "Content-Type:application/json" \
  -d'{"operation":"advance-lsqt","lag":1000}' \
  http://localhost:8002/manage/v2/databases/mydb/temporal/collections?collection=myTempColl

HTTP/1.1 200 OK
Content-type: application/xml; charset=UTF-8
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5
    

Example


# Advance LSQT on the "myTempColl" collection in "mydb", using an XML payload
curl --anyauth --user user:password -i -X POST \
  -H "Content-Type:application/xml" \
  -d'<temporal-collection-operation xmlns="http://marklogic.com/manage"><operation>advance-lsqt</operation><lag>1000</lag></temporal-collection-operation>' \
  http://localhost:8002/manage/v2/databases/mydb/temporal/collections?collection=myTempColl

HTTP/1.1 200 OK
Content-type: application/xml; charset=UTF-8
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.